{
 "metadata": {
  "name": "",
  "signature": "sha256:7cc33d156e1959122173b416c7767bbe6d8f4b1dbf0e40c770146dfa1e8cf99e"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import numpy as np\n",
      "import pandas as pd\n",
      "from os.path import join\n",
      "\n",
      "from pylab import rcParams\n",
      "import matplotlib.pyplot as plt\n",
      "%matplotlib inline\n",
      "rcParams['figure.figsize'] = (16, 8)\n",
      "\n",
      "import nilmtk\n",
      "from nilmtk import DataSet, TimeFrame, MeterGroup, HDFDataStore\n",
      "from nilmtk.disaggregate import CombinatorialOptimisation\n",
      "from nilmtk.utils import print_dict\n",
      "from nilmtk.metrics import f1_score\n",
      "\n",
      "import seaborn as sns\n",
      "\n",
      "import warnings\n",
      "warnings.filterwarnings(\"ignore\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 1
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "data_dir = '/home/nipun/datasets/'\n",
      "we = DataSet(join(data_dir, 'wikienergy.h5'))\n",
      "print('loaded ' + str(len(we.buildings)) + ' buildings')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "loaded 239 buildings\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "building_number = 11\n",
      "print_dict(we.buildings[building_number].metadata)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "html": [
        "<ul><li><strong>instance</strong>: 11</li><li><strong>dataset</strong>: WikiEnergy</li><li><strong>original_name</strong>: 434</li></ul>"
       ],
       "metadata": {},
       "output_type": "display_data",
       "text": [
        "<IPython.core.display.HTML at 0x7fbf1833bf10>"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "elec = we.buildings[building_number].elec\n",
      "elec.appliances"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 4,
       "text": [
        "[Appliance(type='fridge', instance=1),\n",
        " Appliance(type='dish washer', instance=1),\n",
        " Appliance(type='electric water heating appliance', instance=1),\n",
        " Appliance(type='spin dryer', instance=1),\n",
        " Appliance(type='electric furnace', instance=1),\n",
        " Appliance(type='sockets', instance=1),\n",
        " Appliance(type='sockets', instance=2),\n",
        " Appliance(type='air conditioner', instance=1),\n",
        " Appliance(type='sockets', instance=3),\n",
        " Appliance(type='sockets', instance=4)]"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "submeters = elec.submeters().meters\n",
      "submeters"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 5,
       "text": [
        "[ElecMeter(instance=2, building=11, dataset='WikiEnergy', appliances=[Appliance(type='air conditioner', instance=1)]),\n",
        " ElecMeter(instance=3, building=11, dataset='WikiEnergy', appliances=[Appliance(type='sockets', instance=1)]),\n",
        " ElecMeter(instance=4, building=11, dataset='WikiEnergy', appliances=[Appliance(type='sockets', instance=2)]),\n",
        " ElecMeter(instance=5, building=11, dataset='WikiEnergy', appliances=[Appliance(type='dish washer', instance=1)]),\n",
        " ElecMeter(instance=6, building=11, dataset='WikiEnergy', appliances=[Appliance(type='spin dryer', instance=1)]),\n",
        " ElecMeter(instance=7, building=11, dataset='WikiEnergy', appliances=[Appliance(type='electric furnace', instance=1)]),\n",
        " ElecMeter(instance=8, building=11, dataset='WikiEnergy', appliances=[Appliance(type='sockets', instance=3)]),\n",
        " ElecMeter(instance=9, building=11, dataset='WikiEnergy', appliances=[Appliance(type='sockets', instance=4)]),\n",
        " ElecMeter(instance=10, building=11, dataset='WikiEnergy', appliances=[Appliance(type='fridge', instance=1)]),\n",
        " ElecMeter(instance=11, building=11, dataset='WikiEnergy', appliances=[Appliance(type='electric water heating appliance', instance=1)])]"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "simultaneous_switches = elec.simultaneous_switches()"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 6
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "simultaneous_switches"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 7,
       "text": [
        "1391265720000000000    2\n",
        "1391269980000000000    2\n",
        "1391274000000000000    2\n",
        "1391274060000000000    2\n",
        "1391275080000000000    4\n",
        "1391275140000000000    3\n",
        "1391275620000000000    2\n",
        "1391278680000000000    2\n",
        "1391293080000000000    2\n",
        "1391293140000000000    2\n",
        "1391293320000000000    2\n",
        "1391293380000000000    2\n",
        "1391317920000000000    2\n",
        "1391357640000000000    2\n",
        "1391358360000000000    2\n",
        "...\n",
        "1401552180000000000    2\n",
        "1401552900000000000    2\n",
        "1401552960000000000    3\n",
        "1401553980000000000    2\n",
        "1401554400000000000    3\n",
        "1401554460000000000    2\n",
        "1401555600000000000    3\n",
        "1401556680000000000    2\n",
        "1401556740000000000    2\n",
        "1401569040000000000    3\n",
        "1401569100000000000    2\n",
        "1401574680000000000    2\n",
        "1401574740000000000    2\n",
        "1401580500000000000    2\n",
        "1401580560000000000    2\n",
        "Length: 5153, dtype: int64"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "simultaneous_switches.hist()\n",
      "plt.xlabel(\"Number of appliances switching\")\n",
      "plt.ylabel(\"Instances\")\n",
      "plt.title(\"Simultaneous switches for threshold =  40W\");"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAAgIAAAFwCAYAAADKRxObAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t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": [
        "<matplotlib.figure.Figure at 0x7fbee08d7810>"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Simultaneous switches as a function of threshold"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "violations = {}\n",
      "for threshold in [5, 50, 100, 500, 1000]:\n",
      "    violations[threshold] = len(elec.simultaneous_switches(threshold))\n",
      "    "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [],
     "prompt_number": 9
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "violations"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "pyout",
       "prompt_number": 10,
       "text": [
        "{5: 23067, 50: 4461, 100: 2890, 500: 320, 1000: 147}"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "pd.Series(violations).plot(kind='bar');\n",
      "plt.xlabel(\"Threshold\")\n",
      "plt.ylabel(\"Number of simultaneous switches\");"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "metadata": {},
       "output_type": "display_data",
       "png": "iVBORw0KGgoAAAANSUhEUgAAAgEAAAFzCAYAAACn5No2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuUXnV56PHvkHAxJo1JTRAQCWIeNcopSCHtsVariIgt\nlx4LWPFgQWuLR1K7igV7rNeDUFpQtKAoyKUVxXpEWhFBbK0tlSDlplEeKAxClCQwwyVGIBmmf+w9\n8DrMZYe8e7+Zd38/a82avX/78j7zW1mZZ35XkCRJkiRJkiRJkiRJkiRJkiRJkiRJM9BAXS+OiF2B\nC4HFwChwTmaeGREfAN4GrCtvfW9mfr185iTgGGAEOD4zryzL9wHOB3YALs/MFWX59uVnvAy4Hzgi\nM++q62eSJKmfbFPjuzcC787MlwC/BrwzIl5MkRCcnpl7l19jCcAy4AhgGXAgcF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EE8/csOx+rVi11EHBkpSn4iIOcCOmelsly0UEVcBVzHxNMzX\nZub+vYyvW0wCJEkap+xuORE4mCfHsoxNwzwlM4d6FZskSeqRiPiDXsfQLe4dIEnS5vlQrwPoFgcG\nSpI0TltRhMW8AAACYUlEQVSmupoESJL0VK2Y6moSIEnSUznVVZIkSZIkSZIkSZIkzViuGCi1WER8\nF9ge2A54ITA2LWo+cH9m7lvT574KOG1z3x8RHwCemZknTHDtrcAbMvP3uhGj1AYuFiS1WGb+Wmbu\nDRwEDGfm3uV55RXRIqLJ/0dGG/wsqe85RVASPLVVcACYHRGfAn6d4pfvkZn5o/Kv+DOB7wF7A38R\nEf8FnAE8m6JV4WOZeX65oc0FwDJgI3BrZh5RfsaE7weIiD8Hjirvuw54V2b+rDPAiNgO+ATwW8B9\nwFOmckmami0BkibzEuDszPwViv3T/2/HtWXAp8tWgyuBzwPvzsz9gFcAJ0bEC4HXAfMy8yWZuRfw\nh9O9PyJeT5EA/Hpm7gnMAt5XPtOZrLwD2A14MfAaYD9sKZA2i0mApMncmpk3lcfXAnt0XLstM68t\njwN4EfCFiLgB+FeK1oAXATcCL46IT0bEG4HHKrx/f+DizFxfnp9Tlo0Z+0X/KoptXkcy8+fA3+E4\nJ2mz2B0gaTKPdByP8Iv/X6zvOB4A7itbBZ4iIpZR/BJ/PXByROw5zftH+cVf5lP9Yq96n6QJ2BIg\naUvdCmyIiLE+fCLiRRExLyJ2AUYz86vAnwKLgAXTvO+bwBERMTciBoC3UXQ5jBn7Zf8t4C0RMSsi\nngH8fpd+Hqk1TAIkjRkddzzdOQCZuQn4HeDIiLgpIr4PfJKiS2BP4JqIuJGiyf/kzLx3qs/LzCso\nmvb/A7gZeBz4yARxnAP8GPghcDWwEscESJIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkqU/9N4vjl11Z\nc4GCAAAAAElFTkSuQmCC\n",
       "text": [
        "<matplotlib.figure.Figure at 0x7fbee06b3c50>"
       ]
      }
     ],
     "prompt_number": 12
    }
   ],
   "metadata": {}
  }
 ]
}